﻿// The MIT License (MIT)
// Copyright (c) 2010 Nick Darnell
//
// http://www.nickdarnell.com
// http://wpfthemereplacer.codeplex.com

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace QuixoticLabs.Presentation.Test
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            ResourceDictionary aero = Application.LoadComponent(
                new Uri("QuixoticLabs.Presentation.Test;component/themes/Aero.xaml", UriKind.Relative))
                as ResourceDictionary;

            ThemeReplacer.AddTheme(ThemeReplacer.PresentationFramework, aero);
            ThemeReplacer.Initialize();
            ThemeReplacer.ChangeTheme("stealth", "dark");
        }

        private void button3_Click(object sender, RoutedEventArgs e)
        {
            ResourceDictionary royale = Application.LoadComponent(
                new Uri("QuixoticLabs.Presentation.Test;component/themes/Royale.xaml", UriKind.Relative))
                as ResourceDictionary;

            ThemeReplacer.AddTheme(ThemeReplacer.PresentationFramework, royale);
            ThemeReplacer.Initialize();
        }

        private void button4_Click(object sender, RoutedEventArgs e)
        {
            ThemeReplacer.Shutdown();
        }
    }
}
